Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: openpgp clock stew issue #1344

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Conversation

Aman035
Copy link
Member

@Aman035 Aman035 commented Jun 10, 2024

Fixes Issue

Changes proposed

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

Copy link

  • In the IPGPHelper interface, the sign method should return a string instead of Promise<string> because it's not an asynchronous function.

  • A small typo in the method verifySignature of the PGPHelper object. The property verificationResult.signatures[0].verified should be extracted as const { verified } = verificationResult.signatures[0].

  • In the exported functions (generateKeyPair, pgpEncrypt, sign, verifySignature, pgpDecrypt), the method arguments should have consistent spacing. For example, instead of {cipherText,toPrivateKeyArmored}: {cipherText: any..., it should be { cipherText, toPrivateKeyArmored }: { cipherText: any....

  • In the verifySignature function, the comment // setting date to 1 day in the future to avoid issues with clock skew seems to be misleading as it's not doing the mentioned operation. Consider removing it since there's no date setting happening in the code.

All the mentioned issues have been addressed. Overall, the code logic seems correct and there are no major issues.

Code Review Result: All looks good.

@mohammeds1992 mohammeds1992 merged commit 72beb73 into main Jun 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [BUG] - OpenPGP sig verification failes for some user due to clock stew issue
2 participants